package com.csxh.web.user.dao;

import com.csxh.web.user.bean.User;
import com.csxh.web.util.JdbcUtil;
import com.csxh.web.util.LoggerUtil;
/**
 * 数据访问层
 * @author Administrator
 *
 */
public class UserDao {

	public User findOne(Class<User> clazz, String whereClase, Object... params) {
		User u=null;
		try {
			JdbcUtil.openConnection();
			u=JdbcUtil.selectOne(clazz, whereClase, params);
		} catch (Exception e) {
            LoggerUtil.debug(e.getMessage());
            u=null;
		} finally {
			JdbcUtil.closeConnection();
		}
		return u;
	}

}
